import useCountDown from '.';

const CountDownComponent = () => {
  const { count, start, stop } = useCountDown();

  return (
    <div>
      <div>count: {count}</div>
      <button onClick={() => start(50)}>开启</button>
      <button onClick={stop}>关闭</button>
    </div>
  );
};

export default CountDownComponent;
